import {
  getFormatterPrice
} from '@const/filter'
// 寄售补货需求订单列表页面tab状态
export const tabArr = [{
  lab: '待响应',
  val: 1,
  badge: { value: null }
},
{
  lab: '待发货',
  val: 2,
  badge: { value: null }
},
{
  lab: '部分发货',
  val: 3,
  badge: { value: null }
},
{
  lab: '已完成',
  val: 4,
  badge: { value: null }
},
{
  lab: '已撤销',
  val: 5,
  badge: { value: null }
},
{
  lab: '已拒绝',
  val: 6,
  badge: { value: null }
},
{
  lab: '接收失败',
  val: 7,
  badge: { value: null }
},
{
  lab: '全部',
  val: 0,
  badge: { value: null }
}
]
export const ORDER_STATUS_TEXT = {
  1: '待响应',
  2: '待发货',
  3: '部分发货',
  4: '已完成',
  5: '已撤销',
  6: '已拒绝',
  7: '接收失败'
}
// 产品大类
export const PRODUCT_CATEGORY = {
  1: '高值',
  2: '低值',
  3: '试剂',
  4: '设备',
  5: '器械'
}
// 管理分类
export const PRODUCT_MANAGE_CATEGORY = {
  1: '一类',
  2: '二类',
  3: '三类'
}
// 注册地
export const PRODUCT_REGISTER_TYPE = {
  1: '国产',
  2: '港澳台',
  3: '进口'
}

// 查询条件
export const SEARCH_FORM = [{
  key: 'saleOrderCode',
  title: '销售单号',
  type: 'input',
  attr: {
    placeholder: '请输入'
  }
},
{
  key: 'relationOrderCode',
  title: '关联订单号',
  type: 'input',
  attr: {
    placeholder: '请输入'
  }
},
{
  key: 'requireGoodsNo',
  title: '院内要货单号', // 1
  type: 'input',
  attr: {
    placeholder: '请输入'
  }
},
{
  key: 'applyDept',
  title: '申请科室',
  type: 'input',
  attr: {
    placeholder: '请输入'
  }
},
{
  key: 'hospitalName',
  title: '医疗机构',
  type: 'input',
  attr: {
    placeholder: '请输入'
  }
},
{
  key: 'createdAt',
  title: '创建时间',
  type: 'time',
  fieldname: ['beginDate', 'endDate'],
  attr: {
    placeholder: '请选择',
    type: 'daterange',
    'start-placeholder': '开始时间',
    'end-placeholder': '结束时间',
    'default-time': ['00:00:00', '23:59:59'],
    'style': {
      width: '280px'
    }
  }
}
]
// 寄售补货需求订单列表表头
export const ORDER_COLUMNS = [
  {
    prop: 'saleOrderCode',
    minWidth: '150',
    label: '销售单号',
    'show-overflow-tooltip': true
  },
  {
    prop: 'relationOrderCode',
    minWidth: '150',
    label: '关联订单号',
    'show-overflow-tooltip': true
  },
  { prop: 'requireGoodsNo', label: '院内要货单号', minWidth: 170, 'show-overflow-tooltip': true }, // 1
  {
    prop: 'applyDept',
    width: 130,
    label: '申请科室',
    'show-overflow-tooltip': true
  },
  {
    prop: 'prodTypeCount',
    width: 100,
    label: '品种数',
    'show-overflow-tooltip': true
  },
  {
    prop: 'prodTotalCount',
    width: 100,
    label: '产品数量',
    'show-overflow-tooltip': true
  },
  {
    prop: 'orderAmount',
    width: 150,
    label: '订单金额（元）',
    formatter: row => getFormatterPrice(Number(row.orderAmount) || 0)
  },
  {
    prop: 'receiveAddress',
    'min-width': 200,
    label: '收货地址', // 新增
    'show-overflow-tooltip': true
  },
  {
    prop: 'contacts',
    width: '100',
    label: '联系人',
    'show-overflow-tooltip': true
  },
  {
    prop: 'contactNumber',
    width: 130,
    label: '联系电话',
    'show-overflow-tooltip': true
  },
  {
    prop: 'hospitalName',
    minWidth: 150,
    label: '医疗机构',
    'show-overflow-tooltip': true
  }, {
    prop: 'createTime',
    width: 140,
    label: '创建时间',
    'show-overflow-tooltip': true
  },
  {
    prop: 'orderStatus',
    width: '100',
    label: '订单状态',
    formatter: row => ORDER_STATUS_TEXT[row.orderStatus]
  },
  {
    width: 140,
    prop: 'action',
    label: '操作',
    fixed: 'right'
  }
]
// 详情头部信息
export const TOP_INFO = [{
  key: 'orderCode',
  value: '平台订单编号'
},
{
  key: 'deliveryOrderCode',
  value: '配送商订单编号'
},
{
  key: 'orderStatus',
  value: '订单状态'
},
{
  key: 'createdAt',
  value: '下单时间'
},
{
  key: 'hospitalName',
  value: '医疗机构'
},
{
  key: 'prodTypeCount',
  value: '品规数'
},
{
  key: 'receiveAddress',
  value: '寄售地址'
},
{
  key: 'linkMan',
  value: '联系人'
},
{
  key: 'linkPhone',
  value: '联系电话'
},
{
  key: 'orderTotalAmount',
  value: '订单金额'
}
]
// 详情table表头
export const TABLE_COLUMNS = [{
  label: '序号',
  type: 'index',
  width: 60
}, {
  prop: 'orderItemCode',
  label: '订单明细编号',
  width: 190,
  'show-overflow-tooltip': true
}, {
  prop: 'deliveryOrderCode',
  label: '配送商产品编码',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'deliveryProductName',
  label: '配送商产品名称',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'specification',
  label: '规格',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'productType',
  label: '型号',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'manufacturer',
  label: '生产厂家',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'registrationNumber',
  label: '注册证号/备案证号',
  width: 170,
  'show-overflow-tooltip': true
}, {
  prop: 'category',
  label: '产品大类',
  width: 90,
  'show-overflow-tooltip': true,
  formatter: row => PRODUCT_CATEGORY[row.category]
}, {
  prop: 'price',
  label: '单价(元)',
  width: 120,
  formatter: row => getFormatterPrice(Number(row.price) || 0)

}, {
  prop: 'purchaseNum',
  label: '销售数量/单位',
  width: 120,
  formatter: row => `${row.purchaseNum ? row.purchaseNum : 0} ${row.unit ? '/' + row.unit : ''}`

}, {
  prop: 'detailAmount',
  label: '小计金额（元）',
  width: 130,
  formatter: row => getFormatterPrice(Number(row.detailAmount) || 0)
}, {
  prop: 'provinceProductCode',
  label: '省平台产品编码',
  width: 150
}, {
  prop: 'itemCode',
  label: 'M平台产品编码',
  width: 150
}, {
  prop: 'storageCondition',
  label: '储存条件',
  width: 150
}]
// 部分发货配送明细详情table头部信息
// export const TABLE_TOP_INFO = [{
//   label: '配送单号',
//   value: 'orderStatus'
// },
// {
//   label: '配送时间',
//   value: 'orderCreatedAt'
// },
// {
//   label: '配送单数量',
//   value: 'medicalInstitution'
// }
// ]
// 部分详情配送明细table列表表头
export const PART_DETAIL_COLUMNS = [
  {
    width: '40',
    prop: 'placeholder',
    fixed: 'left',
    type: 'expand'
  }, {
    prop: 'cargo',
    label: '配送明细编号',
    minWidth: 160,
    'show-overflow-tooltip': true
  }, {
    prop: 'deliveryProductCode',
    label: '配送商产品编码',
    minWidth: 160,
    'show-overflow-tooltip': true
  }, {
    prop: 'deliveryProductName',
    label: '配送商产品名称',
    minWidth: 160,
    'show-overflow-tooltip': true
  }, {
    prop: 'specification',
    label: '规格型号',
    width: 150,
    'show-overflow-tooltip': true,
    formatter: row => `${row.specification ? row.specification : ''}${row.prodType ? row.prodType : ''}`
  }, {
    prop: 'category',
    label: '产品大类',
    width: 150,
    formatter: row => PRODUCT_CATEGORY[row.category]

  }, {
    prop: 'batch',
    label: '批号',
    width: 150
  }, {
    prop: 'periodDate',
    label: '有效日期',
    width: 170
  }, {
    prop: 'sendNum',
    label: '配送单数量',
    minWidth: 160
  }, {
    prop: 'minUnit',
    label: '计量单位',
    width: 150
  }, {
    prop: 'returnNum',
    label: '质检异常数量',
    width: 150
  }, {
    prop: 'storageCondition',
    label: '储存条件',
    width: 150
  }, {
    prop: 'provinceProductCode',
    label: '省平台产品编码',
    width: 150,
    'show-overflow-tooltip': true
  }, {
    prop: 'itemCode',
    label: 'M平台产品编码',
    width: 150,
    'show-overflow-tooltip': true
  }]
// 部分详情列表中的列表
export const PART_DETAIL_COLUMNS_INSIDE = [
  {
    label: '序号',
    type: 'index',
    width: 56
  }, {
    prop: 'udi',
    label: 'UDI',
    minWidth: 100,
    'show-overflow-tooltip': true
  }, {
    prop: 'barCode',
    label: '主条码',
    minWidth: 100,
    'show-overflow-tooltip': true
  }, {
    prop: 'productBatch',
    label: '批号',
    minWidth: 100,
    'show-overflow-tooltip': true
  }, {
    prop: 'productDate',
    label: '生产日期',
    width: 100
  }, {
    prop: 'expDate',
    label: '有效期',
    width: 100
  }, {
    prop: 'erialNumber',
    label: '序列号',
    minWidth: 100,
    'show-overflow-tooltip': true
  }, {
    prop: 'num',
    label: '数量',
    width: 90
  }, {
    prop: 'entryNumd',
    label: '条码图片',
    width: 100
  }
]
// 发货头部信息
export const DELIVER_TOP_INFO = [{
  key: 'orderCode',
  value: '平台订单编号'
}, {
  key: 'deliveryOrderCode',
  value: '配送商订单编号'
},
{
  key: 'orderStatus',
  value: '订单状态'
}, {
  key: 'createdAt',
  value: '下单时间'
},
{
  key: 'hospitalName',
  value: '医疗机构'
},
{
  key: 'prodTypeCount',
  value: '品规数'
},
{
  key: 'orderDetailCount',
  value: '总数量'
},
{
  key: 'sendNumCount',
  value: '配送数量'
},
{
  key: 'awaitSendNum',
  value: '待配送数量'
},
{
  key: 'receiveAddress',
  value: '收货地址'
}, {
  key: 'linkMan',
  value: '联系人'
}, {
  key: 'linkPhone',
  value: '联系电话'
},
{
  key: 'orderTotalAmount',
  value: '订单总金额'
}
]
// 发货table列表表头
export const DELIVER_GOODS_COLUMNS = [
  {
    width: '40',
    prop: 'placeholder',
    fixed: 'left',
    type: 'expand'
  }, {
    prop: 'deliveryProductCode',
    label: '配送商产品编码',
    minWidth: 150,
    'show-overflow-tooltip': true
  }, {
    prop: 'deliveryProductName',
    label: '配送商产品名称',
    minWidth: 150,
    'show-overflow-tooltip': true
  }, {
    prop: 'productType',
    label: '规格 型号',
    width: 150,
    'show-overflow-tooltip': true,
    formatter: row => `${row.specification ? row.specification : ''}${row.prodType ? row.prodType : ''}`
  }, {
    prop: 'manufacturer',
    label: '生产厂家',
    width: 100,
    'show-overflow-tooltip': true
  }, {
    prop: 'registrationNumber',
    label: '注册证号/备案证号',
    width: 170,
    'show-overflow-tooltip': true
  }, {
    prop: 'category',
    label: '产品大类',
    width: 100,
    'show-overflow-tooltip': true,
    formatter: row => PRODUCT_CATEGORY[row.category]

  }, {
    prop: 'purchaseNum',
    label: '订单总数量',
    width: 100
  }, {
    prop: 'sendNum',
    label: '已发货数量',
    width: 100
  }, {
    prop: 'sweepCount',
    label: '已扫码/待发货数量',
    width: 150,
    formatter: row => `${row.sweepCount ? row.sweepCount : 0}${row.awaitSendNum ? `/${row.awaitSendNum}` : '/' + 0} ${row.unit ? row.unit : ''}`
  }, {
    prop: 'storageCondition',
    label: '存储条件',
    minWidth: 100
  }, {
    prop: 'provinceProductCode',
    label: '省平台产品编码',
    width: 150,
    'show-overflow-tooltip': true
  }, {
    prop: 'itemCode',
    label: 'M平台产品编码',
    width: 150,
    'show-overflow-tooltip': true
  }, {
    prop: 'action',
    label: '操作',
    width: 100,
    fixed: 'right'
  }
]
// 确认
export const TOP_CONFIRM = [{
  key: 'orderCode',
  label: '平台订单编号' // 1
},
{
  key: 'deliveryOrderCode',
  label: '配送商订单编号'
},
{
  key: 'orderStatus',
  label: '订单状态'
},
{
  key: 'createdAt',
  label: '下单时间'
},
{
  key: 'hospitalName',
  label: '医疗机构'
},
{
  key: 'prodTypeCount',
  label: '品规数'
},
{
  key: 'receiveAddress',
  label: '寄售地址'
},
{
  key: 'concatMan',
  label: '联系人'
},
{
  key: 'concatPhone',
  label: '联系电话'
},
{
  key: 'orderTotalAmount',
  label: '订单金额'
}
]
// 确认table表头
export const CONFIRM_COLUMNS = [{
  label: '序号',
  type: 'index',
  width: 60
}, {
  prop: 'orderItemCode',
  label: '订单明细编号',
  width: 190,
  'show-overflow-tooltip': true
}, {
  prop: 'supplierId',
  label: '供应商',
  width: 190,
  'show-overflow-tooltip': true
}, {
  prop: 'deliveryOrderCode',
  label: '配送商产品编码',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'deliveryProductName',
  label: '配送商产品名称',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'specification',
  label: '规格',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'productType',
  label: '型号',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'manufacturer',
  label: '生产厂家',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'registrationNumber',
  label: '注册证号/备案证号',
  width: 170,
  'show-overflow-tooltip': true
}, {
  prop: 'category',
  label: '产品大类',
  width: 90,
  'show-overflow-tooltip': true,
  formatter: row => PRODUCT_CATEGORY[row.category]
}, {
  prop: 'price',
  label: '单价(元)',
  width: 120,
  formatter: row => getFormatterPrice(Number(row.price) || 0)

}, {
  prop: 'purchaseNum',
  label: '销售数量/单位',
  width: 120,
  formatter: row => `${row.purchaseNum ? row.purchaseNum : 0} ${row.unit ? '/' + row.unit : ''}`

}, {
  prop: 'detailAmount',
  label: '小计金额(元)',
  width: 130,
  formatter: row => getFormatterPrice(Number(row.detailAmount) || 0)
}, {
  prop: 'provinceProductCode',
  label: '省平台产品编码',
  width: 150
}, {
  prop: 'itemCode',
  label: 'M平台产品编码',
  width: 150
}]
export const supplierOptions = [
  {
    label: '123',
    value: 1
  },
  {
    label: '123',
    value: 1
  },
  {
    label: '123',
    value: 1
  }
]
export const responseTableData = [
  { width: 60, type: 'selection', align: 'center' },
  { label: '序号', type: 'index', width: 56 },
  { prop: 'saleDetailCode', label: '销售明细单号', width: 160, 'show-overflow-tooltip': true }, // 1
  { prop: 'relationDetailCode', label: '关联明细单号', width: 160, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodCustomCode', label: '产品编码', width: 150, 'show-overflow-tooltip': true }, // 1
  // { prop: 'hospitalProductCode', label: '医院产品编码', width: 150 },
  { prop: 'prodName', label: '产品名称', 'min-width': 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodSpecs', label: '规格', width: 150, 'show-overflow-tooltip': true },
  { prop: 'prodModel', label: '型号', width: 150, 'show-overflow-tooltip': true },
  { prop: 'minUnit', label: '最小单位', width: 100 },
  // { prop: 'price', label: '单价 （元）', width: 150, formatter: row => getFormatterPrice(Number(row.price) || 0) },
  { prop: 'price', label: '销售价格（元）', width: 200 },
  { prop: 'templatePrice', label: '模板价格（元）', width: 130 },
  { prop: 'priceDifference', label: '价格差异（元）', width: 130 },
  { prop: 'registrationNumber', label: '注册证号/备案证号', width: 170, 'show-overflow-tooltip': true },
  { prop: 'manufacturer', label: '生产厂家', width: 150, 'show-overflow-tooltip': true },
  { prop: 'prodBigCategory', label: '产品大类', width: 100 },
  { prop: 'saleCount', label: '销售数量', width: 120 },
  { prop: 'detailAmount', label: '小计金额 （元）', width: 150, formatter: row => getFormatterPrice(Number(row.detailAmount) || 0) },
  // { prop: 'hospitalProdCode', label: '医疗机构产品编码', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'supplierName', label: '供应商', width: 150, 'show-overflow-tooltip': true },
  { prop: 'remarks', label: '备注', width: 150, 'show-overflow-tooltip': true }
]
export const responseDetail = [
  [
    //  { key: 'purchaseOrderStatus', label: '订单状态' },
    { key: 'saleOrderCode', label: '销售单号' },
    { key: 'relationOrderCode', label: '关联订单号' },
    { key: 'orderStatus', label: '订单状态' }],
  [
    { key: 'createDate', label: '创建时间' },
    { key: 'hospitalName', label: ' 医疗机构' },
    { key: 'applyDept', label: '申请科室' }
  ],
  [
    { key: 'receiveAddress', label: '收货地址' },
    { key: 'contacts', label: '联系人' },
    { key: 'contactNumber', label: '联系电话' }
  ]
]
export const partDetailsTableData = [
  { label: '序号', type: 'index', width: 56 },
  { prop: 'saleDetailCode', label: '销售明细单号', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'relationDetailCode', label: '关联明细单号', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodCustomCode', label: '产品编码', width: 150, 'show-overflow-tooltip': true }, // 1
  // { prop: 'hospitalProductCode', label: '医院产品编码', width: 150 },
  { prop: 'prodName', label: '产品名称', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodSpecs', label: '规格', width: 150, 'show-overflow-tooltip': true },
  { prop: 'prodModel', label: '型号', width: 150, 'show-overflow-tooltip': true },
  { prop: 'minUnit', label: '最小单位', width: 100 },
  { prop: 'registrationNumber', label: '注册证号/备案证号', width: 170, 'show-overflow-tooltip': true },
  { prop: 'manufacturer', label: '生产厂家', width: 150, 'show-overflow-tooltip': true },
  { prop: 'prodBigCategory',
    label: '产品大类',
    width: 100
  },
  { prop: 'price', label: '单价 （元）', width: 150, formatter: row => getFormatterPrice(Number(row.price) || 0) },

  { prop: 'saleCount', label: '销售数量', width: 150 },
  { prop: 'detailAmount', label: '小计金额 （元）', width: 150, formatter: row => getFormatterPrice(Number(row.detailAmount) || 0) },
  // { prop: 'hospitalProdCode', label: '医疗机构产品编码', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'supplierName', label: '供应商', width: 150, 'show-overflow-tooltip': true },
  { prop: 'remarks', label: '备注', width: 150, 'show-overflow-tooltip': true },
  { prop: 'deliveredCount', label: '已发货数量', width: 100 },
  { prop: 'undeliveredCount', label: '待发货数量', width: 100 }
  // { prop: 'itemCode', label: 'M平台产品编码', width: 150 },
  // { prop: 'storageCondition', label: '储存条件', width: 150 }
]
// 接收失败
export const partFailtedDetailsTableData = [
  { type: 'index', label: '序号', width: 55 }, // 1
  { prop: 'saleDetailCode', label: '销售明细单号', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'relationDetailCode', label: '关联明细单号', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'pssProdCode', label: '产品编码', width: 200 }, // 1
  { prop: 'pssProdName', label: '产品名称', width: 300 }, // 1
  { prop: 'pssManufacturer', label: '生产厂家', width: 150, 'show-overflow-tooltip': true },
  { prop: 'pssProdSpecs', label: '规格', width: 150, 'show-overflow-tooltip': true },
  { prop: 'pssProdModel', label: '型号', width: 150, 'show-overflow-tooltip': true },
  { prop: 'pssProdMinUnit', label: '最小单位', width: 100 },
  { prop: 'pssRegistNo', label: '注册证号/备案证号', width: 170, 'show-overflow-tooltip': true },

  // { prop: 'hspProdCode', label: '医院产品编码', width: 150, 'show-overflow-tooltip': true },
  // { prop: 'hspProdName', label: '医院产品名称', width: 150, 'show-overflow-tooltip': true },
  // { prop: 'hspProdSpecs', label: '规格(医院)', width: 150, 'show-overflow-tooltip': true },
  // { prop: 'hspProdModel', label: '型号(医院)', width: 150, 'show-overflow-tooltip': true },
  // { prop: 'hspProdMinUnit', label: '最小单位(医院)', width: 150 },
  // { prop: 'hspRegistNo', label: '注册证号(医院)', width: 170, 'show-overflow-tooltip': true },
  { prop: 'hspProdBigCategory',
    label: '产品大类',
    width: 150 },
  { prop: 'price', label: '单价（元）', width: 150, formatter: row => getFormatterPrice(Number(row.price) || 0) },
  { prop: 'purchaseCount', label: '销售数量', width: 150 },
  { prop: 'detailAmount', label: '小计金额（元）', width: 150, formatter: row => getFormatterPrice(Number(row.detailAmount) || 0) },
  { prop: 'remarks', label: '备注', width: 150, 'show-overflow-tooltip': true }
  // { prop: 'upEnterpriseName', label: '供应商', width: 150, 'show-overflow-tooltip': true }
]
// 部分收货 - 收货明细表单内容
export const receiptDetailsForm = [
  { key: 'inStockCode', title: '收货单号' },
  { key: 'inStockObjCode', title: '收货时间' },
  { key: 'createdAt', title: ' 收货单数量' },
  { key: 'status', title: '实际收货数量' }
]

// 部分收货 - 收货明细 - 表格
export const receiptDetailsTable = [
  { label: '序号', type: 'index', width: 56 },
  { prop: 'deliverDetailCode', label: '发货明细单号', width: 170, 'show-overflow-tooltip': true }, // 1
  { prop: 'relationDetailCode', label: '关联明细单号', width: 170, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodCustomCode', label: '产品编码', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodName', label: '产品名称', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodSpecs', label: '规格', width: 150, 'show-overflow-tooltip': true },
  { prop: 'prodModel', label: '型号', width: 150, 'show-overflow-tooltip': true },
  { prop: 'minUnit', label: '最小单位', width: 100 },
  { prop: 'price', label: '单价 (元)', width: 150, formatter: row => getFormatterPrice(Number(row.price) || 0) }, // 1
  { prop: 'registrationNumber', label: '注册证号/备案证号', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'manufacturer', label: '生产厂家', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodBigCategory',
    label: '产品大类',
    width: 100
  },
  { prop: 'saleCount', label: '销售数量', width: 150 }, // 1
  { prop: 'detailAmount', label: '小计金额 （元）', width: 150, formatter: row => getFormatterPrice(Number(row.detailAmount) || 0) }, // 1
  { prop: 'remarks', label: '备注', width: 150, 'show-overflow-tooltip': true },
  { prop: 'hospitalProdCode', label: '医疗机构产品编码', width: 180 }, // 1
  { prop: 'supplierName', label: '供应商', width: 150 }, // 1
  { prop: 'deliveredCount', label: '发货数量', width: 150 },
  { prop: 'refuseCount', label: '拒收数量', width: 170 }
]
export const dialogReceiptDetails = [
  { prop: 'prodCustomCode', label: '产品编码', width: 150 }, // 1
  { prop: 'prodName', label: '产品名称', width: 150 }, // 1
  { prop: 'prodSpecs', label: '规格', width: 150, 'show-overflow-tooltip': true },
  { prop: 'prodModel', label: '型号', width: 150, 'show-overflow-tooltip': true },
  { prop: 'minUnit', label: '最小单位', width: 150 },
  { prop: 'price', label: '单价 (元)', width: 150, formatter: row => getFormatterPrice(Number(row.price) || 0) }, // 1
  { prop: 'registrationNumber', label: '注册证号/备案证号', width: 150 }, // 1
  { prop: 'manufacturer', label: '生产厂家', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'prodBigCategory',
    label: '产品大类',
    width: 150,
    formatter: row => {
      return PRODUCT_CATEGORY[row.prodBigCategory]
    } },
  { prop: 'saleCount', label: '销售数量', width: 150 }, // 1
  { prop: 'detailAmount', label: '小计金额 （元）', width: 150, formatter: row => getFormatterPrice(Number(row.detailAmount) || 0) }, // 1
  { prop: 'hospitalProdCode', label: '医疗机构产品编码', width: 180 }, // 1
  { prop: 'supplierName', label: '供应商', width: 150, 'show-overflow-tooltip': true }, // 1
  { prop: 'deliveredCount', label: '发货数量', width: 150 }, // 1
  { prop: 'refuseCount', label: '拒收数量', width: 170 }
]
export const detailTabsArr = [
  { lab: '订单信息', val: 0, disabled: null },
  { lab: '发货信息', val: 1, disabled: null }
]
export const recordFormDetail = [
  [
    //  { key: 'purchaseOrderStatus', label: '订单状态' },
    { key: 'saleOrderCode', label: '销售单号' },
    { key: 'relationOrderCode', label: '关联订单号' },
    { key: 'orderStatus', label: '订单状态' }],
  [
    { key: 'createDate', label: '创建时间' },
    { key: 'hospitalName', label: ' 医疗机构' },
    { key: 'applyDept', label: '申请科室' }
  ],
  [{ key: 'receiveAddress', label: '收货地址' },
    { key: 'contacts', label: '联系人' },
    { key: 'contactNumber', label: '联系电话' }
  ],
  [
    { key: 'prodTotalCount', label: '产品总数' },
    { key: 'prodTypeCount', label: '品种数' },
    { key: 'orderAmount', label: '订单金额', show: true }
  ]
]
export const reciveDetailInfo = [
  [
    //  { key: 'purchaseOrderStatus', label: '订单状态' },
    { key: 'saleOrderCode', label: '销售单号' },
    { key: 'relationOrderCode', label: '关联订单号' },
    { key: 'orderStatus', label: '订单状态' }],
  [
    { key: 'createDate', label: '创建时间' },
    { key: 'hospitalName', label: ' 医疗机构' },
    { key: 'applyDept', label: '申请科室' }
  ],
  [{ key: 'receiveAddress', label: '收货地址' },
    { key: 'contacts', label: '联系人' },
    { key: 'contactNumber', label: '联系电话' }
  ]
]
// 收货记录 弹框详情列表
export const reciveTableInside = [
  { label: '序号', type: 'index', width: 80 },
  { prop: 'barCode', label: '主码', width: 150 },
  { prop: 'productDate', label: '生产日期', width: 150 },
  { prop: 'expDate', label: '失效日期', width: 150 },
  { prop: 'productBatch', label: '批号', width: 150 },
  { prop: 'serialNumber', label: '序列号', width: 150 },
  { prop: 'udi', label: 'UDI', width: 150 },
  { prop: 'count', label: '数量', width: 170 }
]
// 详情查询条件
export const detailsSearchForm = [
  {
    key: 'matchStatus',
    title: '对照状态',
    type: 'select',
    attr: {
      placeholder: '请选择' // 1
    },
    options: [
      {
        value: '0',
        label: '全部'
      }, {
        value: '1',
        label: '未对照'
      }, {
        value: '2',
        label: '已对照'
      }
    ]
  },
  {
    key: 'companyProdCode',
    title: '产品编码',
    type: 'input',
    attr: {
      placeholder: '请输入' // 1
    }
  },
  {
    key: 'productName',
    title: '产品名称',
    type: 'input',
    attr: {
      placeholder: '请输入' // 1
    }
  },
  {
    key: 'factory',
    title: '生产企业名称',
    type: 'input',
    attr: {
      placeholder: '请输入' // 1
    }
  }
]
export const reciveDetailInfoOrder = [
  [
    //  { key: 'purchaseOrderStatus', label: '订单状态' },
    { key: 'deliverCode', label: '发货单号' },
    { key: 'deliverTime', label: '发货时间' },
    { key: 'deliverer', label: '发货人' }],
  [
    { key: 'deliverCount', label: '发货产品总数' },
    { key: 'deliverTypeCount', label: ' 品种数' },
    { key: 'deliverTotalAmount', label: '金额合计 （元）', show: true }
  ]
]

// 详情查询条件---接受失败
export const detailsSearchFormFailed = [
  {
    key: 'matchStatus',
    title: '对照状态',
    type: 'select',
    attr: {
      placeholder: '请选择' // 1
    },
    options: [
      {
        value: '0',
        label: '全部'
      }, {
        value: '1',
        label: '未对照'
      }, {
        value: '2',
        label: '已对照'
      }
    ]
  },
  {
    key: 'pssProdCode',
    title: '产品编码',
    type: 'input',
    attr: {
      placeholder: '请输入' // 1
    }
  },
  {
    key: 'pssProdName',
    title: '产品名称',
    type: 'input',
    attr: {
      placeholder: '请输入' // 1
    }
  },
  {
    key: 'pssManufacturer',
    title: '生产企业名称',
    type: 'input',
    attr: {
      placeholder: '请输入' // 1
    }
  }
]
